#ifndef LOGIN_H
#define LOGIN_H

#include <QWidget>
#include <QtSql>
#include <QEvent>
#include "inquiresql.h"
#include "mainwindow.h"

namespace Ui {
class Login;
}

enum LastClickLogin {comboBox_staff_ID, lineEdit_Password, pushButton_Login};

class Login : public QWidget
{
    Q_OBJECT
    
public:
    explicit Login(QWidget *parent = 0);
    ~Login();
    bool eventFilter(QObject *target, QEvent *event);
    
protected:
     virtual void resizeEvent ( QResizeEvent * event );

private slots:
    void on_PushButton_Exit_clicked();

    void on_pushButton_Login_clicked();

    void on_lineEdit_Password_returnPressed();

private:
    Ui::Login *ui;
    InquireSql *m_sql;
    MainWindow *m_home_page;
    int m_lastClick;
};

#endif // LOGIN_H
